package com.steven.download.download.db.room;

import com.steven.download.download.db.DownloadEntity;
import com.steven.download.entity.JsonPathEntity;

import java.util.List;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

/**
 * @Des:
 * @Author: hwz
 * @Date:2021/11/12 0012
 * @Version: 1.0
 */
@Dao
public interface UninstallDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(JsonPathEntity... books);

    @Update
    void update(JsonPathEntity... books);

    @Delete
    void delete(JsonPathEntity... books);

    @Query("SELECT * FROM jsonpath")
    List<JsonPathEntity> queryAll();

    @Query("SELECT * FROM jsonpath WHERE zipPath IN(:zipPath)")
    JsonPathEntity queryJsonByPath(String zipPath);
}
